package org.jsola.hr.web;

import io.swagger.annotations.Api;
import io.swagger.annotations.ApiImplicitParam;
import io.swagger.annotations.ApiImplicitParams;
import io.swagger.annotations.ApiOperation;
import org.jsola.core.Page;
import org.jsola.core.Result;
import org.jsola.hr.dto.EmpSocRelatedAddDTO;
import org.jsola.hr.dto.EmpSocRelatedUpdateDTO;
import org.jsola.hr.dto.excel.EmpImportSocRelatedDTO;
import org.jsola.hr.query.EmpSocRelatedQuery;
import org.jsola.hr.vo.EmpSocRelatedListVO;
import org.jsola.hr.vo.EmpSocRelatedVO;
import org.springframework.web.bind.annotation.RequestBody;

import java.util.List;

/**
 * 员工社保相关信息表
 *
 * @author zhr
 */
@Api(tags = "hr-员工社保相关信息表")
public interface IEmpSocRelatedControllerAPI {

    /**
     * 新增员工社保相关信息表
     *
     * @param empSocRelatedAddDTO 员工社保相关信息表新增实体
     * @return 员工社保相关信息表展示对象
     */
    @ApiOperation(value = "新增员工社保相关信息表")
    @ApiImplicitParams({
            @ApiImplicitParam(name = "empSocRelatedAddDTO", dataType = "EmpSocRelatedAddDTO", value = "新增员工社保相关信息表", paramType = "body")
    })
    Result<EmpSocRelatedVO> save(EmpSocRelatedAddDTO empSocRelatedAddDTO);


    /**
     * 修改员工社保相关信息表
     *
     * @param empSocRelatedUpdateDTO 员工社保相关信息表
     * @return 更新数量
     */
    @ApiOperation(value = "修改员工社保相关信息表")
    @ApiImplicitParams({
            @ApiImplicitParam(name = "empSocRelatedUpdateDTO", dataType = "EmpSocRelatedUpdateDTO", value = "修改员工社保相关信息表", paramType = "body")
    })
    Result<Integer> update(EmpSocRelatedUpdateDTO empSocRelatedUpdateDTO);


    /**
     * 删除单个员工社保相关信息表，彻底删除
     *
     * @param empSocRelatedId 员工社保相关信息表id
     * @return 删除数量
     */
    @ApiOperation(value = "删除单个员工社保相关信息表，彻底删除")
    @ApiImplicitParams({
            @ApiImplicitParam(name = "empSocRelatedId", dataType = "String", value = "员工社保相关信息表id", paramType = "path")
    })
    Result<Integer> delete(String empSocRelatedId);


    /**
     * 批量删除员工社保相关信息表，彻底删除
     *
     * @param empSocRelatedIds 员工社保相关信息表id集合
     * @return 删除数量
     */
    @ApiOperation(value = "批量删除员工社保相关信息表，彻底删除")
    @ApiImplicitParams({
            @ApiImplicitParam(name = "empSocRelatedIds", dataType = "String[]", value = "员工社保相关信息表id数组", paramType = "body", allowMultiple = true)
    })
    Result<Integer> deleteBatch(String[] empSocRelatedIds);


    /**
     * 根据员工社保相关信息表id查询员工社保相关信息表详情
     *
     * @param empSocRelatedId 员工社保相关信息表id
     * @return 员工社保相关信息表详情
     */
    @ApiOperation(value = "根据员工社保相关信息表id查询员工社保相关信息表详情")
    @ApiImplicitParams({
            @ApiImplicitParam(name = "empSocRelatedId", dataType = "String", value = "员工社保相关信息表id", paramType = "path")
    })
    Result<EmpSocRelatedVO> findById(String empSocRelatedId);


    /**
     * 查询员工社保相关信息表
     *
     * @param empSocRelatedQuery 员工社保相关信息表查询参数
     * @return page
     */
    @ApiOperation(value = "查询员工社保相关信息表")
    @ApiImplicitParams({
            @ApiImplicitParam(name = "empSocRelatedQuery", dataType = "EmpSocRelatedQuery", value = "员工社保相关信息表查询参数", paramType = "query")
    })
    Result<List<EmpSocRelatedListVO>> listAll(EmpSocRelatedQuery empSocRelatedQuery);


    /**
     * 分页查询员工社保相关信息表
     *
     * @param empSocRelatedQuery 员工社保相关信息表查询参数
     * @return page
     */
    @ApiOperation(value = "分页查询员工社保相关信息表")
    @ApiImplicitParams({
            @ApiImplicitParam(name = "empSocRelatedQuery", dataType = "EmpSocRelatedQuery", value = "员工社保相关信息表查询参数", paramType = "query")
    })
    Result<Page<EmpSocRelatedListVO>> page(EmpSocRelatedQuery empSocRelatedQuery);

    /**
     * 初始化公司下所有员工的社保相关信息
     *
     * @param companyId 公司Id
     * @return 初始化结果
     */
    @ApiOperation(value = "初始化公司下所有员工的社保相关信息")
    @ApiImplicitParams({
            @ApiImplicitParam(name = "companyId", dataType = "String", value = "公司Id", paramType = "path")
    })
    Result<String> initAllRelatedByCompany(String companyId);

    /**
     * 查询花名册详情社保相关信息
     *
     * @param empId     员工Id
     * @param companyId 公司Id
     * @return 社保相关信息
     */
    @ApiOperation(value = "查询花名册详情社保相关信息")
    @ApiImplicitParams({
            @ApiImplicitParam(name = "empId", dataType = "String", value = "员工Id", paramType = "query"),
            @ApiImplicitParam(name = "companyId", dataType = "String", value = "公司Id", paramType = "query")
    })
    Result<EmpImportSocRelatedDTO> findEmpSocRelated(String empId, String companyId);

    /**
     * 花名册详情页修改社保相关信息
     *
     * @param empId     员工id
     * @param updateDTO 更新信息
     * @return 执行结果
     */
    @ApiOperation(value = "花名册详情页修改社保相关信息")
    @ApiImplicitParams({
            @ApiImplicitParam(name = "updateDTO", dataType = "EmpImportSocRelatedDTO", value = "修改参数", paramType = "body")
    })
    Result<String> empUpdateSocDate(@RequestBody EmpImportSocRelatedDTO updateDTO);

    /**
     * 增员时校验导入人员的社保项
     *
     * @param itemType 增员类型
     * @param empList  员工Id列表
     * @return 员工导入的增员信息
     */
    @ApiOperation(value = "增员时校验导入人员的社保项")
    @ApiImplicitParams({
            @ApiImplicitParam(name = "empList", dataType = "array", value = "员工Id列表", paramType = "body")
    })
    Result<EmpSocRelatedListVO> empSocRelatedImportData(List<String> empList);

    /**
     * 校验员工是否可以被删除 true 可以 false 不可以
     *
     * @param empId 员工Id
     * @return 是否可以被删除
     */
    @ApiOperation(value = "校验员工是否可以被删除 true 可以 false 不可以")
    @ApiImplicitParams({
            @ApiImplicitParam(name = "empId", dataType = "String", value = "员工Id", paramType = "path")
    })
    Result<Boolean> checkEmpCanBeDeleted(String empId);

}

